package com.csnf.hymall.service.impl;


import com.csnf.hymall.dao.AdminMapper;
import com.csnf.hymall.dao.imp.AdminMapperImp;
import com.csnf.hymall.entity.Admin;
import com.csnf.hymall.service.AdminService;

public class AdminServiceImpl implements AdminService {
    AdminMapper adminMapper = new AdminMapperImp();

    @Override
    public boolean update(Admin admin) {
        return adminMapper.updateOne(admin) > 0;
    }

    @Override
    public Admin get(String admin_name, Integer admin_id) {
        return adminMapper.selectOne(admin_name, admin_id);
    }

    @Override
    public Admin login(String admin_name, String admin_password) {
        return adminMapper.selectByLogin(admin_name, admin_password);
    }
}
